package com.cb.web.wasf.sample.web;

import com.cb.web.wasf.sample.model.ProfilManager;
import com.cb.web.wasf.sample.model.RoleManager;
import com.cb.web.wasf.sample.model.UserManager;
import com.google.inject.Injector;
import java.lang.ref.WeakReference;

/**
 * @author CBO
 */
public class ManagerLocator {

    static WeakReference<Injector> injector;

    static public ProfilManager getProfilManager() {
        return injector.get().getInstance(ProfilManager.class);
    }

    static public UserManager getUserManager() {
        return injector.get().getInstance(UserManager.class);
    }

    static public RoleManager getRoleManager() {
        return injector.get().getInstance(RoleManager.class);
    }
}
